Name :Take the maximum value
Symbol :MAX
Illustrate:
The function of this type of module is to assign the larger of input parameter 1 and input parameter 2 to the output parameter OUT.
Image:
Parameter:
| Parameter | Statement | Type | Description |
|---|---|---|---|
| IN1 | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING | The first input value |
| IN2 | Input | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING | The second input value |
| OUT | Output | BOOL/BYTE/WORD/DWORD/INT/SINT/DINT/UINT/USINT/UDINT/REAL/TIME/STRING | Output value |
Example:
LD:
ST:
Interpretation:
| parameter | operand | value |
|---|---|---|
| IN1 | TagIn1 | Enter a value:100 |
| IN2 | TagIn2 | Enter a value:1 |
| OUT | TagOut | Output value:100 |
IN1 and IN2 input the corresponding types of data, and MAX outputs the maximum value of the two.